<?php

namespace app\validate;

use think\Validate;

class CareerShowcaseValidate extends Validate
{
    protected $rule = [
        'member_id' => 'require|number',
        'company'   => 'require|max:100',
        'position'  => 'require|max:100',
        'salary'    => 'max:50',
        'story'     => 'max:1000',
    ];

    protected $message = [
        'member_id.require' => '学员ID不能为空',
        'member_id.number'  => '学员ID必须为数字',
        'company.require'   => '公司名称不能为空',
        'company.max'       => '公司名称不能超过100字',
        'position.require'  => '职位不能为空',
        'position.max'      => '职位不能超过100字',
        'salary.max'        => '薪资信息不能超过50字',
        'story.max'         => '经历故事不能超过1000字',
    ];

    protected $scene = [
        'create' => ['member_id', 'company', 'position', 'salary', 'story'],
    ];
}
